<template>
    <div class="rl31dg-2 iKCdHH">
        <div class="rl31dg-3 fCytZy">
            <div class="sc-1d9uflq-1 kjzgGw">
                <h1 class="jc6i63-0 sc-1d9uflq-2 cmoiYo">创建一个管理应用</h1>
                <p class="djs2am-0 sc-1d9uflq-3 hVuhLe">基于服务化组件创建前后端分离，单体管理应用.</p>
                <div class="sc-494z8g-0 sc-494z8g-1 sc-4eglrx-3 fyoXML">
                    <el-alert title="此功能内测中" type="success" :closable="false" style="line-height: 30px;" show-icon></el-alert>

                    <br/>

                    <templates-group ref="templates-group" />

                    <div class="sc-4eglrx-7 iHjquI">
                        <router-link to="/index" tag="button" class="sc-4eglrx-8 dsYJZf">取消</router-link>
                        <el-button @click="generatorProjectInfo" class="aap711-0 LrZpX  dash-color-primary dash-size-large" font-weight="700">
                            <span>下一步</span>
                        </el-button>
                    </div>
                </div>
            </div>
        </div>

    </div>
</template>

<script>

import { generatorTemplateProject } from '@/api/api'

import componentAttr from './component/attribute'
import templatesGroup from './component/templateGroup'

export default {
    data() {
        return {
            form: {
              templateId:'' ,
              attribute:'' ,
              icon: ''
            } ,
          };
    },
    components: {
        componentAttr ,
        templatesGroup
    },
    methods:{
      generatorProjectInfo(){

          this.$message({
              message: '功能还在内测中...',
              type: 'warning'
          });

        return ;
        /* 
        后期开发打开
        var selectItem=this.$refs['templates-group'].selectItem
        const templateIdList = this.$refs['templates-group'].componentList[selectItem] ; 
        console.log('templateIdList = ' + templateIdList) ;

        if(templateIdList == undefined){
          this.$message.error('请先选择模板.');
          return ;
        }

        const templateId = templateIdList.id;
        console.log('template id = ' + templateId) ;

        sessionStorage.setItem("templateId", templateId) ; 

        const path = "/build/projectInfo/manager" ;
        this.$router.push(path) ;
        */
      }
      /*
      deployToGit(){
        generatorTemplateProject(this.form).then(response => {
          if(response.code == 200){
            var pId = response.data ;
            const path = "/build/connectGit/" + pId;
            this.$router.push(path) ;
          }
        })
      },
      */
    }
  };
</script>

<style scoped lang="scss">
@import '@/asserts/css/build/component.scss';
</style>


